package com.wynet.shopsapp.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.wynet.shopsapp.util.AliOssUtil;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

@Data
@TableName("t_oss_log")
@NoArgsConstructor
public class OssLog {
    @TableId(type = IdType.AUTO)
    private Integer id;
    private String bname;
    private String objname;
    private String preurl;
    /**
     * 类型：1.图片 2.视频*/
    private Integer type;
    private Date etime;
    private Date ctime;

    public OssLog(String objname, String preurl, Integer type, Date etime) {
        this.bname = AliOssUtil.bucket;
        this.objname = objname;
        this.preurl = preurl;
        this.type = type;
        this.etime = etime;
        this.ctime=new Date();
    }
}
